class ContractPayResultListBean {
  String page;
  String pageNum;
  int lastPage;
  bool isLeader;
  List<ContractPaymentListItemBean> payList;

  ContractPayResultListBean(
      {this.page, this.pageNum, this.lastPage, this.isLeader, this.payList});

  ContractPayResultListBean.fromJson(Map<String, dynamic> json) {
    page = json['page'].toString();
    pageNum = json['page_num'].toString();
    lastPage = json['last_page'];
    isLeader = json['is_leader'];
    if (json['data'] != null) {
      payList = new List<ContractPaymentListItemBean>();
      json['data'].forEach((v) {
        payList.add(new ContractPaymentListItemBean.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['page'] = this.page;
    data['page_num'] = this.pageNum;
    data['last_page'] = this.lastPage;
    data['is_leader'] = this.isLeader;
    if (this.payList != null) {
      data['data'] = this.payList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ContractPaymentListItemBean {
  String id;
  String contractId; //合同id
  String contractNumber; //合同号
  String contractUrl; //合同详情链接路径
  String contractPaymentUrl; //合同付款计划链接路径
  String suiteAddress; //公寓地址
  String suiteId; //公寓ID
  String landlordId; //业主id
  String landlordName; //业主姓名
  String landlordPhone; //业主手机号
  String status; //处理状态
  String executeStatus; //执行状态
  String payFailedDate; //付款失败时间
  String paySucessfulDate; //付款成功时间
  String payFailedReason; //付款失败原因
  String changebankId; //账户变更工单id
  String executorId; //责任销售id
  String executorName; //责任销售名字
  String createdAt; //记录创建时间
  String updatedAt; //记录更新时间
  bool canChangebankNew; //是否显示变更账户信息按钮
  String changebankNewUrl; //创建变更账户信息链接路径
  bool canChangebankShow; //是否显示查看变更详情按钮
  String changebankShowUrl; //查看变更详情链接路径
  ContractPaymentListItemBean({
    this.id,
    this.contractId,
    this.contractNumber,
    this.contractUrl,
    this.contractPaymentUrl,
    this.suiteAddress,
    this.suiteId,
    this.landlordId,
    this.landlordName,
    this.landlordPhone,
    this.status,
    this.executeStatus,
    this.payFailedDate,
    this.paySucessfulDate,
    this.payFailedReason,
    this.changebankId,
    this.executorId,
    this.executorName,
    this.createdAt,
    this.updatedAt,
    this.canChangebankNew,
    this.changebankNewUrl,
    this.canChangebankShow,
    this.changebankShowUrl,
  });

  ContractPaymentListItemBean.fromJson(Map<String, dynamic> json) {
    id = json['id']?.toString()??'';
    contractId = json['contract_id']?.toString() ?? '';
    contractNumber = json['contract_number'] ?? '';
    contractUrl = json['contract_url'] ?? '';
    contractPaymentUrl = json['contract_payment_url'] ?? '';
    suiteAddress = json['suite_address'] ?? '';
    suiteId = json['suite_id']?.toString() ?? '';
    landlordId = json['landlord_id']?.toString() ?? '';
    landlordName = json['landlord_name'] ?? '';
    landlordPhone = json['landlord_phone'] ?? '';
    status = json['status'] ?? '';
    executeStatus = json['execute_status'] ?? '';
    payFailedDate = json['pay_failed_date'] ?? '';
    paySucessfulDate = json['pay_sucessful_date'] ?? '';
    payFailedReason = json['pay_failed_reason'] ?? '';
    changebankId = json['changebank_id']?.toString() ?? '';
    executorId = json['executor_id']?.toString() ?? '';
    executorName = json['executor_name'] ?? '';
    createdAt = json['created_at'] ?? '';
    updatedAt = json['updated_at'] ?? '';
    canChangebankNew = json['can_changebank_new'];
    changebankNewUrl = json['changebank_new_url'];
    canChangebankShow = json['can_changebank_show'];
    changebankShowUrl = json['changebank_show_url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['contract_id'] = this.contractId;
    data['contract_number'] = this.contractNumber;
    data['contract_url'] = this.contractUrl;
    data['contract_payment_url'] = this.contractPaymentUrl;
    data['suite_address'] = this.suiteAddress;
    data['suite_id'] = this.suiteId;
    data['landlord_id'] = this.landlordId;
    data['landlord_name'] = this.landlordName;
    data['landlord_phone'] = this.landlordPhone;
    data['status'] = this.status;
    data['execute_status'] = this.executeStatus;
    data['pay_failed_date'] = this.payFailedDate;
    data['pay_sucessful_date'] = this.paySucessfulDate;
    data['pay_failed_reason'] = this.payFailedReason;
    data['changebank_id'] = this.changebankId;
    data['executor_id'] = this.executorId;
    data['executor_name'] = this.executorName;
    data['created_at'] = this.createdAt;
    data['updated_at'] = this.updatedAt;
    data['can_changebank_new'] = this.canChangebankNew;
    data['changebank_new_url'] = this.changebankNewUrl;
    data['can_changebank_show'] = this.canChangebankShow;
    data['changebank_show_url'] = this.changebankShowUrl;
    return data;
  }
}
